package com.example.administrator.commonlyused.itemview;

import android.content.Context;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.administrator.commonlyused.R;
import com.example.administrator.commonlyused.bean.AnnotationItem;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;


@EViewGroup(R.layout.item)
public class AnnotationTtemView extends RelativeLayout
{
    @ViewById
    TextView tvTitle;

    @ViewById
    TextView tvDetail;

    @ViewById
    ImageView imgIcon;

    public AnnotationTtemView(Context context)
    {
        super(context);
    }

    public void bind(AnnotationItem item)
    {
        tvTitle.setText(item.getTitle());
        tvDetail.setText(item.getDetail());
        imgIcon.setImageResource(item.getImageId());
    }
}
